package com.treasure.mall.zbqmallmanager.config;

import com.treasure.mall.biz.service.core.auth.SystemService;
import com.treasure.mall.zbqmallmanager.base.OperatorIdArgumentResolver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

/**
 * @author allan
 * @date 2019-10-15
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Autowired
    private SystemService systemService;

    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
        resolvers.add(new OperatorIdArgumentResolver(systemService));
    }
}
